<h1>Listing cells</h1>
Note: you can get the Kml view here: <%= link_to(image_tag("google_earth.png"),"/cells.kml") %>

<table>
  <tr>
  <% for column in Cell.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  <th>Country</th>
  <th>Operator</th>
  </tr>
  
<% for cell in @cells %>
  <tr>
  <% for column in Cell.content_columns %>
    <td>
    <% if column.name!="nbSamples" %>
    <%=h cell.send(column.name) %>
    <% else %>
    <%=link_to cell.send(column.name),:controller=>'measure',:action=>'map',:id=> cell %>
    <% end %>
    </td>
  <% end %>
    <td><%= if cell.country!=nil then cell.country.name else "none" end  %></td>  
    <td><%= if cell.operator!=nil then cell.operator.name else "none" end  %></td>  
    <td><%= link_to 'Show', :action => 'show', :id => cell %></td>
    <td><%= link_to 'Map', :action => 'map', :id => cell %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @cell_pages.current.previous } if @cell_pages.current.previous %>
<%= link_to 'Next page', { :page => @cell_pages.current.next } if @cell_pages.current.next %> 

<br />

